<template>
  <div>
    <div class="w">
      <el-card>
        <div class="we">
          <span class="el-icon-s-promotion"></span>
          地产列表
        </div>
        <ul>
          <li v-for="item in dataList" :key="item.id">
            <div class="left">
              <img :src="item.image" alt="" />
            </div>
            <div class="rigth">
              <h1>{{ item.title }}</h1>
              <div class="text" v-html="item.content"></div>
            </div>
          </li>
        </ul>
      </el-card>
    </div>
  </div>
</template>

<script>
import { gerSearchinfo } from "@/api/search";
export default {
  data() {
    return {
      dataInfo: {
        title_contains: this.$route.query.title_contains,
      },
      dataList: [],
    };
  },
  async created() {
    let res = await gerSearchinfo(this.dataInfo);
    this.dataList = res.data;
  },
};
</script>
<style lang="less" scoped>
.el-card{
    padding-top: 70px;
}
ul {
    
  li {
    width: 100%;
    height: 200px;
    border: 1px solid #ccc;
    margin-top: 10px;
    display: flex;
    .left {
      flex: 1;
      border-right: 1px solid #ccc;
      img {
        width: 100%;
        height: 100%;
      }
    }
    .rigth {
      flex: 2;
      h1 {
        text-align: center;
        margin-top: 10px;
      }
      .text {
        padding: 20px;
      }
    }
  }
}
.we{
     color: #e6a23c;
    font-size: 24px;
   
}
</style>
